package at.codebase.security;

import at.codebase.core.BitFlags;

/**
 * Pre-defined flags for authorization.
 * 
 * @author Daniel Marth <danielmarth@gmx.at>
 */
public class AuthorizationFlags {
	
	/**
	 * User is not logged in or even not registered.
	 */
	public static final BitFlags Null = new BitFlags(0x0000);
	/**
	 * User is logged in.
	 */
	public static final BitFlags LoggedIn = new BitFlags(0x0001);
	/**
	 * User is logged in as administrator.
	 */
	public static final BitFlags Administrator = new BitFlags(0x0002);
	/**
	 * User is logged in and is the owner of the page (e.g. the page about an
	 * item which belongs to the logged in user).
	 */
	public static final BitFlags Owner = new BitFlags(0x0004);
	/**
	 * User is either owner of the page (@see AuthorizationFlags.Owner) or an administrator
	 * (@see AuthorizationFlags.Administrator).
	 */
	public static final BitFlags OwnerOrAdministrator = new BitFlags(Administrator.or(Owner));
	
}
